package com.example.deng.test;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

/**
 * Created by deng on 2017/4/6.
 */

public class out extends AppCompatActivity {
    private String timeout;
    private String number;
    //private EditText outnumber;
    private DatabaseHandler1 dbHelper;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_out);
        dbHelper=new DatabaseHandler1(this,"labcar",null,1);
        Button mbotton6 = (Button) findViewById(R.id.button6);
        mbotton6.setOnClickListener(new Button.OnClickListener(){
            public void onClick(View v){
                EditText outnumber = (EditText) findViewById(R.id.number2);
                time t2=new time();
                number=outnumber.getText().toString();
                timeout=t2.channge(t2.getTime());
                car c1=new car(number,"",timeout);
                //dbHelper.updateContact(c1,dbHelper);
                Intent intent = new Intent();
                intent.setClass(out .this,printf .class);
                intent.putExtra("N",number);
                intent.putExtra("TO",timeout);
                startActivity(intent);
            }
        });
    }

}
